package com.ruoyi.dzzh.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.dzzh.service.IDzzhStaticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author：cjt
 * @name：DzzhStaticController
 * @Date：2023/4/8 14:06
 */
@RestController
@RequestMapping("/dzzh/statics")

public class DzzhStaticsController {
    @Autowired
    private IDzzhStaticsService dzzhStaticsService;

    @RequestMapping("/staticsAll")
    public AjaxResult countMaps() {
        Map map = dzzhStaticsService.staticsAll();
        if (map == null) {
            return AjaxResult.error("未获取统计数据");
        }
        return AjaxResult.success(map);
    }

}
